require(rddtools)
require(AER)
require(tidyverse)
require(rdrobust)
source('Habit_source.R', echo=TRUE)

states = tolower(c("AL", "AR", "CA", "CT", "FL", "IL", "IN", "KS", "KY", "MA", "MD",
                   "MO",
                   "NE", "NV", "NY", "OH", "OR", "PA", "RI", "SC", "TN", "TX", "VA", "WA",
                   "WV"))
for(p in 0:3){
for(state in states){
  file = paste0('rdd_',state,'.Rdata')
    load(file)
    source('primary_analysis_rdd_specifications.R')
    print(state)
  

}
  print(p)
}

